public class Complex {
    int realpart;
    int imaginpart;

    public Complex() {
    }

    public Complex(int realpart, int imaginpart) {
        this.realpart = realpart;
        this.imaginpart = imaginpart;
    }
public Complex Complexadd(Complex one){
        return new Complex(this.realpart+ one.realpart,this.imaginpart+ one.imaginpart);
}
 static Complex ComplexAdd(Complex a,Complex b){
        return new Complex(a.realpart+b.realpart,a.imaginpart+b.imaginpart);
 }
static Complex ComplexSub(Complex a,Complex b){
        return new Complex(a.realpart-b.realpart,a.imaginpart-b.imaginpart);
}
static Complex ComplexMultiply(Complex a,Complex b){
       int real=a.realpart*b.realpart-a.imaginpart*b.imaginpart;
       int imagin=a.realpart*b.imaginpart+a.imaginpart*b.realpart;
        return new Complex(real,imagin);
}
    static Complex ComplexDivide(Complex a,Complex b){
        int real=(a.realpart * b.realpart + a.imaginpart * b.imaginpart) /(b.realpart*b.realpart+b.imaginpart*b.imaginpart);
        int imagin=(a.imaginpart * b.realpart - a.realpart * b.imaginpart) /(b.realpart*b.realpart+b.imaginpart*b.imaginpart);
        return new Complex(real,imagin);
    }
}
